#include "Random.h"
#include "Edge.h"
std::set<Point*, cmp_Point_ptr> Point::Point_set;
std::vector<Point*> Point::Point_vector;
std::map<Point*, int> Point::Point_map;
Point::Point() :x(0), y(0) {}
Point::Point(const int _x, const int _y) :x(_x), y(_y) {
}
Point::Point(const Point& other) {
	this->x = other.x;
	this->y = other.y;
}
Point::~Point() {}
int Point::get_x() const {
	return this->x;
}
int Point::get_y() const {
	return this->y;
}
void Point::set_x(const int _x) {
	this->x = _x;
}
void Point::set_y(const int _y) {
	this->y = _y;
}
std::set<Point*, cmp_Point_ptr>* Point::set()
{
	return &Point::Point_set;
}

std::vector<Point*>* Point::vector()
{
	return &Point::Point_vector;
}

std::map<Point*, int>* Point::map()
{
	return &Point::Point_map;
}

void add_Point(Point& p)
{
	Point* p_ptr = new Point(p.get_x(), p.get_y());
	Point::set()->emplace(p_ptr);
}

void del_Point(Point& p)
{
	Point* p_ptr = &p;
	auto P = Point::set()->find(p_ptr);
	Point::set()->erase(P);
	Point* ptr = *P;
	delete ptr;
}
